package com.ruoyi.bizsys.service.impl;

import java.util.List;
import java.util.Arrays;
                                                        import com.ruoyi.common.utils.DateUtils;
            import org.springframework.stereotype.Service;
    import com.ruoyi.bizsys.mapper.MarketPageActionLogMapper;
import com.ruoyi.bizsys.domain.MarketPageActionLog;
import com.ruoyi.bizsys.service.IMarketPageActionLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;


/**
 * 落地页面操作Service业务层处理
 *
 * @author african-loan
 * @date 2021-10-28
 */
@Service
public class MarketPageActionLogServiceImpl extends ServiceImpl<MarketPageActionLogMapper,MarketPageActionLog> implements IMarketPageActionLogService {

    /**
     * 查询落地页面操作
     *
     * @param id 落地页面操作ID
     * @return 落地页面操作
     */
    @Override
    public MarketPageActionLog selectMarketPageActionLogById(Long id) {
        return this.getById(id);
    }

    /**
     * 查询落地页面操作列表
     *
     * @param marketPageActionLog 落地页面操作
     * @return 落地页面操作
     */
    @Override
    public List<MarketPageActionLog> selectMarketPageActionLogList(MarketPageActionLog marketPageActionLog) {
        return this.list(new QueryWrapper<>(marketPageActionLog).last("order by id desc"));
    }

    /**
     * 新增落地页面操作
     *
     * @param marketPageActionLog 落地页面操作
     * @return 结果
     */
            @Override
    public int insertMarketPageActionLog(MarketPageActionLog marketPageActionLog) {
                                                                                                marketPageActionLog.setCreateTime(DateUtils.getNowDate());
                            return baseMapper.insert(marketPageActionLog);
    }

    /**
     * 修改落地页面操作
     *
     * @param marketPageActionLog 落地页面操作
     * @return 结果
     */
            @Override
    public int updateMarketPageActionLog(MarketPageActionLog marketPageActionLog) {
                                                                                                return baseMapper.updateById(marketPageActionLog);
    }

    /**
     * 批量删除落地页面操作
     *
     * @param ids 需要删除的落地页面操作ID
     * @return 结果
     */
            @Override
    public int deleteMarketPageActionLogByIds(Long[] ids) {
        return baseMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除落地页面操作信息
     *
     * @param id 落地页面操作ID
     * @return 结果
     */
    @Override
    public int deleteMarketPageActionLogById(Long id) {
        return baseMapper.deleteById(id);
    }

}
